<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*body > p {*/
        /*    background-color: lightblue;*/
        /*}*/

        .active ~ p {
            background-color: lightblue;
        }
    </style>
</head>
<body>
<p>p1</p>
<p class="active">p2</p>
<p>p3</p>
<p>p4</p>
<ul>
    <li><p>p5</p></li>
    <li><p>p6</p></li>
    <li><p>p7</p></li>
</ul>
<p class="active">p8</p>
<p>p9</p>
</body>
</html>